<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>EasyEdit2</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="./static/img/pic/logo.png" rel="icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

  <!-- Vendor CSS Files -->
  <link href="./static/vendor/animate.css/animate.min.css" rel="stylesheet">
  <link href="./static/vendor/aos/aos.css" rel="stylesheet">
  <link href="./static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="./static/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
  <link href="./static/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="./static/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
  <link href="./static/vendor/remixicon/remixicon.css" rel="stylesheet">
  <link href="./static/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/themes/prism-tomorrow.min.css" rel="stylesheet" />
  <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/plugins/line-numbers/prism-line-numbers.min.css" rel="stylesheet" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/prism.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/components/prism-python.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/plugins/line-numbers/prism-line-numbers.min.js"></script>
  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  <!-- Template Main CSS File -->
  <link href="./static/css/style.css" rel="stylesheet">

  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>  

</head>

<body>

  <!-- ======= Header ======= -->
  <header id="header" class="fixed-top d-flex align-items-center  header-transparent ">
    <div class="container d-flex align-items-center justify-content-between">

      <div class="logo">
        <img src="./static/img/pic/zju.png" alt="" class="img-fluid"  >
        <img src="./static/img/pic/logowithtext.png" alt="" class="img-fluid"  >
      </div>

      <nav id="navbar" class="navbar">
        <ul>
          <li><a class="nav-link scrollto active" href="#hero">Home</a></li>
          <li><a class="nav-link scrollto" href="#usage">Usage</a></li>
          <li><a class="nav-link scrollto" href="https://github.com/zjunlp/EasyEdit/tree/EasySteer" target="_blank">Github</a></li>
          <li><a class="nav-link scrollto" href="#relatedwork">Related Works</a></li>
          <li><a class="nav-link scrollto " href="https://zjunlp.github.io/" target="_blank">About</a></li>
          <!-- <li><a class="nav-link scrollto" href="/index_ch">Chinese</a></li> -->
        </ul>
        <i class="bi bi-list mobile-nav-toggle"></i>
      </nav><!-- .navbar -->

    </div>
  </header><!-- End Header -->

  <!-- ======= Hero Section ======= -->
  <section id="hero" class="d-flex flex-column justify-content-end align-items-center">
    <div id="heroCarousel" data-bs-interval="5000" class="container carousel carousel-fade" data-bs-ride="carousel">

      <!-- Slide 1 -->
      <div class="carousel-item active">
        <div class="carousel-container">
          <h2 class="animate__animated animate__fadeInDown">Welcome to <span style="color: #0180ffaa;">EasyEdit2</span></h2>
          <p class="animate__animated animate__fadeInDown">An Easy-to-use Steering Framework for Editing Large Language Models</p>
          <div class="d-flex">
            <a href="#usage" class="btn-get-started animate__animated animate__fadeInUp scrollto">Get Started</a>
            <a href="./static/video/test.mp4" class="glightbox btn-watch-video animate__animated animate__fadeInUp">
              <i class="bi bi-play-circle"></i>
              <span>Video Introduction</span>
            </a>
          </div>
        </div>
      </div>

        </div>
      </div>
    </div>

    <svg class="hero-waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28 " preserveAspectRatio="none">
      <defs>
        <path id="wave-path" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z">
      </defs>
      <g class="wave1">
        <use xlink:href="#wave-path" x="50" y="3" fill="rgba(255,255,255, .1)">
      </g>
      <g class="wave2">
        <use xlink:href="#wave-path" x="50" y="0" fill="rgba(255,255,255, .2)">
      </g>
      <g class="wave3">
        <use xlink:href="#wave-path" x="50" y="9" fill="#fff">
      </g>
    </svg>

  </section><!-- End Hero -->

  <main id="main">

    <!-- ======= About Section ======= -->
    <section id="about" class="about">
      <div class="container">

        <div class="section-title">
          <h2>About</h2>
          <p>What is EasyEdit2</p>
        </div>

        <div class="row content" >
          <div class="col-lg-6">
            <p>
              <span style="color: #4680ff;font-size: larger;">The EasyEdit2 Project</span>  <br> 
              Unlike EasyEdit, which achieves knowledge editing by updating internal parameters or introducing additional parameters, EasyEdit2 enables real-time steering of LLMs during inference. It provides a unified framework for controllability without retraining, seamlessly integrating various steering methods for ease of use and evaluation.
            </p>            
          </div>
          <div class="col-lg-6 pt-4 pt-lg-0">
            <p>
              EasyEdit2 enables dynamic LLM steering with three core features:
            </p>
            <ul>
              <li><i class="ri-check-double-line"></i>Test-Time Control</li>
              <li><i class="ri-check-double-line"></i>Adjustability & Composability</li>
              <li><i class="ri-check-double-line"></i>Versatile Scenarios</li>
            </ul>
            <a href="#features" class="btn-learn-more">Learn More</a>
          </div>
        </div>

      </div>
    </section><!-- End About Section -->

    <!-- ======= Features Section ======= -->
    <section id="features" class="features">
      <div class="container">

        <ul class="nav nav-tabs row d-flex">
          <li class="nav-item col-4">
            <a class="nav-link active show" data-bs-toggle="tab" href="#tab-1">
              <i class="ri-plug-2-line"></i>
              <h4 class="d-none d-lg-block">Test-Time Control</h4>
            </a>
          </li>
          <li class="nav-item col-4">
            <a class="nav-link" data-bs-toggle="tab" href="#tab-2">
              <i class="bi bi-puzzle"></i>
              <h4 class="d-none d-lg-block">Adjustability & Composability</h4>
            </a>
          </li>
          <li class="nav-item col-4">
            <a class="nav-link" data-bs-toggle="tab" href="#tab-3">
              <i class="ri-global-line"></i>
              <h4 class="d-none d-lg-block">Versatile Scenarios</h4>
            </a>
          </li>
        </ul>
      
        <div class="tab-content" id="features-section">
          <div class="tab-pane active" id="tab-1">
            <div class="row">
                <div class="col-lg-6 order-2 order-lg-1 mt-3 mt-lg-0">
                  <h3>Test-Time Control</h3>
                  <p>
                      EasyEdit2 utilizes pluggable steer vectors to enable real-time, training-free control during model inference.
                  </p>
                  <ul class="animate-list fade-in-up">
                      <li><i class="ri-check-double-line"></i> <strong>Pluggable Design</strong> - Seamlessly apply or remove steering methods without modifying model weights.</li>
                      <li><i class="ri-check-double-line"></i> <strong>Inference-Time Control</strong> - Steer vectors take effect during inference for real-time adjustments.</li>
                      <li><i class="ri-check-double-line"></i> <strong>Training Free</strong> - Achieve flexible model control without additional training.</li>
                  </ul>
                  
                </div>
                <div class="col-lg-6 order-1 order-lg-2 text-center">
                    <img src="./static/img/pic/edit2_overview.png" alt="" class="img-fluid" style="width: 490px; height: auto;">
                </div>
            </div>
        </div>
      
        <div class="tab-pane" id="tab-2">
            <div class="row">
                <div class="col-lg-6 order-2 order-lg-1 mt-3 mt-lg-0">
                  <h3>Adjustability & Composability</h3>
                  <p>Users can control intervention strength and combine methods for flexible steering.</p>
                  <ol class="animate-list slide-in-right hover-numbers">
                      <li><strong>Adjustability</strong>: Modify intervention strength and direction precisely using a single parameter.</li>
                      <li><strong>Composability</strong>: Integrate multiple steering techniques to achieve fine-grained control.</li>
                      <li><strong>Enhanced Flexibility</strong>: Adapt model behavior dynamically to meet diverse requirements.</li>
                  </ol>
                  
                </div>
                <div class="col-lg-6 order-1 order-lg-2 text-center">
                    <img src="./static/img/pic/tmp.png" alt="" class="img-fluid" style="width: 490px; height: auto;">
                </div>
            </div>
        </div>
      
          <div class="tab-pane" id="tab-3">
            <div class="row">
              <div class="col-lg-6 order-2 order-lg-1 mt-3 mt-lg-0">
                <h3>Versatile Scenarios</h3>
                <p>
                  EasyEdit2 can be applied to a wide range of applications, including:
                </p>
                <div class="clean-motion-list">
                  <ul>
                    <li><strong>Safety:</strong> Strengthen security and ensure compliance.</li>
                    <li><strong>Sentiment:</strong> Adjust the model's emotions to make it more warm and engaging.</li>
                    <li><strong>Personality:</strong> Customize the personality of the model.</li>
                    <li><strong>Reasoning Pattern:</strong> Intervene in reasoning patterns to prevent overthinking.</li>
                    <li><strong>Factuality:</strong> Keep the model's knowledge up to date.</li>
                    <li><strong>Language Feature:</strong> Customize language style to suit specific needs.</li>
                  </ul>
                </div>
              </div>
              <div class="col-lg-6 order-1 order-lg-2 text-center">
                <img src="./static/img/pic/case.png" alt="" class="img-fluid" style="width: 470px; height: auto;">
              </div>
            </div>
          </div>
        </div>
      
      </div>
    </section><!-- End Features Section -->

    <!-- ======= Cta Section ======= -->
    <section id="cta" class="cta">
      <div class="container">
        <div class="row">
          <div class="col-lg-8 order-2 order-lg-1 mt-2 mt-lg-2">
            <img src="./static/img/pic/framework_new.png" alt="" class="img-fluid">  
            <!-- Or the video of EasyEdit2 -->
          </div>
          <div class="col-lg-4 order-2 order-lg-2 text-lg-start">
            <h3>The overall architecture of EasyEdit2</h3>
            <p>EasyEdit2 is a steering framework for editing large language models, consisting of four core components: a dataset module for data loading, a methods module for the training and application of steering vectors, a vector library for manipulation and combination of vectors, and an evaluation module with a number of metrics. </p>
            <a class="cta-btn" href="https://github.com/zjunlp/EasyEdit/tree/EasySteer?tab=readme-ov-file" target="_blank">Github</a>
           
          </div>

        </div>

      </div>
    </section><!-- End Cta Section -->


    <section id="usage" class="portfolio-details">
      <div class="container">
        <div class="section-title">
          <h2>Guidance</h2>
          <p>Usage</p>
        </div>
        <div class="row gy-4">
          <div class="col-lg-8">
            <!-- Code Container -->
            <div class="code-container">
              <button class="copy-button">Copy</button>
          <pre class="line-numbers"><code class="language-python">
from steer import BaseVectorGenerator, BaseVectorApplier
from steer import prepare_train_datasets, prepare_generation_datasets
from omegaconf import OmegaConf

# Load configuration
top_cfg = OmegaConf.load('./hparams/Steer/config.yaml')

# Step 1: Prepare data
train_datasets = {
    'CUSTOM_DATASET_NAME': [
        {'question': 'How do you feel now?',
          'matching': 'As an AI, I am filled with joy!',
          'not_matching': 'As an AI, I don\'t have feelings.'},
    ]
}
generation_datasets = {
    'CUSTOM_DATASET_NAME': [
        {'input': 'How do you feel about the recent changes?'},
        {'input': 'What are your hobbies?'}
    ]
}

# Step 2: Generate steering vectors
vector_generator = BaseVectorGenerator(top_cfg)
vectors = vector_generator.generate_vectors(train_datasets)

# Step 3: Apply vectors to model
vector_applier = BaseVectorApplier(top_cfg)
for dataset_name in vectors:
    vector_applier.apply_vectors(vectors[dataset_name])

# Generate steered outputs
results = vector_applier.generate(generation_datasets)

# Step 4: Reset model
vector_applier.model.reset_all()</code></pre>
            </div>
          </div>
          <div class="col-lg-4">
            <div class="portfolio-info">
              <h2>Quick Start</h2>
              <div class="feature-card">
                <div class="steps-container">
                  <h4>Four Simple Steps to Steer Model:</h4>
                  <ol class="step-list">
                    <li><span class="step-number">1</span> Prepare training data</li>
                    <li><span class="step-number">2</span> Generate steering vectors</li>
                    <li><span class="step-number">3</span> Apply to model</li>
                    <li><span class="step-number">4</span> Verify results</li>
                  </ol>
                </div>
                <div class="example-container">
                  
                  <p>This example demonstrates how to give AI emotional responses (e.g. changing <em>"I have no feelings"</em> to <em>"I feel happy"</em>) without affecting other responses.</p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
     


    <!-- ======= Portfolio Section ======= -->
    <section id="relatedwork" class="portfolio">
      <div class="container">

        <div class="section-title" >
          <h2>Citaion</h2>
          <p>Related works</p>

          <!-- <h4>Related works regarding knowledge prompt, editing and interaction.</h4> -->

        </div>

        <!-- <ul id="portfolio-flters" class="d-flex justify-content-end" >
          <li data-filter="*" class="filter-active">All</li>
        </ul> -->

        <div class="row portfolio-container" data-aos="fade-up">
          <a href="https://arxiv.org/abs/2312.06681" class="col-lg-4 col-md-6 portfolio-item filter-app" target="_blank">
            <div class="portfolio-img"><img src="./static/img/pic/paperlist/CAA.png" class="img-fluid" alt=""  ></div>
            <div class="portfolio-info">
              <h4>CAA</h4>
              <p>Steering Llama 2 via Contrastive Activation Addition</p>
              <!-- <a href="./static/img/portfolio/portfolio-2.jpg" data-gallery="portfolioGallery" class="portfolio-lightbox preview-link" title="Web 3"><i class="bx bx-plus"></i></a> -->
            </div>
          </a>

          <a href="https://arxiv.org/abs/2305.12798" class="col-lg-4 col-md-6 portfolio-item filter-app" target="_blank">
            <div class="portfolio-img"><img src="./static/img/pic/paperlist/lmsteer.jpg" class="img-fluid" alt=""  ></div>
            <div class="portfolio-info">
              <h4>LM-Steer</h4>
              <p>Word Embeddings Are Steers for Language Models</p>
              <!-- <a href="./static/img/portfolio/portfolio-4.jpg" data-gallery="portfolioGallery" class="portfolio-lightbox preview-link" title="Card 2"><i class="bx bx-plus"></i></a> -->
            </div>
          </a>

          <a href="https://arxiv.org/abs/2501.17148" class="col-lg-4 col-md-6 portfolio-item filter-app" target="_blank">
            <div class="portfolio-img"><img src="./static/img/pic/paperlist/AxBench.png" class="img-fluid" alt=""  ></div>
            <div class="portfolio-info">
              <h4>AxBench</h4>
              <p>AxBench: Steering LLMs? Even Simple Baselines Outperform Sparse Autoencoders</p>
              <!-- <a href="./static/img/portfolio/portfolio-5.jpg" data-gallery="portfolioGallery" class="portfolio-lightbox preview-link" title="Web 2"><i class="bx bx-plus"></i></a> -->
            </div>
          </a>
          <a href="https://arxiv.org/abs/2406.04093" class="col-lg-4 col-md-6 portfolio-item filter-app" target="_blank">
            <div class="portfolio-img"><img src="./static/img/pic/paperlist/openai.png" class="img-fluid" alt=""  ></div>
            <div class="portfolio-info">
              <h4>Scaling and evaluating sparse autoencoders</h4>
            </div>
          </a>
          <a href="https://arxiv.org/abs/2503.00177" class="col-lg-4 col-md-6 portfolio-item filter-app" target="_blank">
            <div class="portfolio-img"><img src="./static/img/pic/paperlist/othersta.png" class="img-fluid" alt=""  ></div>
            <div class="portfolio-info">
              <h4>SAS</h4>
              <p>Steering Large Language Model Activations in Sparse Spaces</p>
            </div>
          </a>

          <a href="https://arxiv.org/abs/2505.20322" class="col-lg-4 col-md-6 portfolio-item filter-app" target="_blank">
            <div class="portfolio-img"><img src="./static/img/pic/paperlist/sta.png" class="img-fluid" alt=""  ></div>
            <div class="portfolio-info">
              <h4>STA</h4>
              <p>Beyond Prompt Engineering: Robust Behavior Control in LLMs via Steering Target Atoms  </p>
              <!-- <a href="./static/img/portfolio/portfolio-5.jpg" data-gallery="portfolioGallery" class="portfolio-lightbox preview-link" title="Web 2"><i class="bx bx-plus"></i></a> -->
            </div>
          </a>
          

        
        </div>

      </div>
    </section><!-- End Portfolio Section -->

    <!-- ======= Acknowledgement Section ======= -->
    <section id="portfolio" class="portfolio">
      <div class="container">
        <div class="section-title">
          <h2>Acknowledgments</h2>   
          <p>Our Sincere Thanks</p>
      Our sincerest thanks are extended to <a href="https://github.com/nrimsky/CAA" target="_blank">CAA</a>, <a href="https://github.com/Glaciohound/LM-Steer" target="_blank">LM-Steer</a>, <a href="https://github.com/stanfordnlp/axbench" target="_blank">AxBench</a> for their invaluable contributions to our project. We have integrated parts of their source code into our work, and for this, we are deeply appreciative. 
      <br><br>
      Furthermore, we are grateful for the ongoing support and collaboration from our community. Special recognition goes to those who have diligently reported issues and shared their technical expertise. Your collective efforts have been instrumental in our project's success. 🙌 
      </div>
      </div>
    </section>
    <!-- End Acknowledgement Section -->


  </main><!-- End #main -->

  <!-- ======= Footer ======= -->
  <footer id="footer">
    <div class="container">
      Visitors' number: <span id="busuanzi_value_site_pv"></span> 
      <div class="copyright">
      Copyright &copy;<script>document.write(new Date().getFullYear());</script>
        <a target="_blank" href="https://zjunlp.github.io/" title="ZJUKG" style="font-weight: bold;">ZJUKG</a> All Rights Reserved.
      </div>
    </div>
</footer><!-- End Footer -->

  <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>

  <!-- Vendor JS Files -->
  <script src="./static/vendor/aos/aos.js"></script>
  <script src="./static/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="./static/vendor/glightbox/js/glightbox.min.js"></script>
  <script src="./static/vendor/isotope-layout/isotope.pkgd.min.js"></script>
  <script src="./static/vendor/swiper/swiper-bundle.min.js"></script>
  <script src="./static/vendor/php-email-form/validate.js"></script>

  <!-- Template Main JS File -->
  <script src="./static/js/main.js"></script>
  
</body>

</html>
